/*
 * Copyright (c) 2021. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
 * Morbi non lorem porttitor neque feugiat blandit. Ut vitae ipsum eget quam lacinia accumsan.
 * Etiam sed turpis ac ipsum condimentum fringilla. Maecenas magna.
 * Proin dapibus sapien vel ante. Aliquam erat volutpat. Pellentesque sagittis ligula eget metus.
 * Vestibulum commodo. Ut rhoncus gravida arcu.
 */

package com.pobing.web;

import com.pobing.service.HelloService;
import com.pobing.service.MoveService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @author xfworld
 * @since create on 2021-06-28.
 **/
@RestController
public class HelloController {

    @Autowired
    private HelloService helloService;

    @Autowired
    private MoveService moveService;

    @GetMapping("/hello/{name}")
    public Map sayHello(@PathVariable String name){
        return helloService.getGreeting(name);
    }


    @GetMapping("/move/{name}")
    public Map<String,String> moveData(@PathVariable String name){
        return moveService.moveData(name);
    }

}
